home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / text / edit / Smartindent.lha / Smartindent / Smartindent.readme < prev    next >
Text File  |  1997-12-14  |  6KB  |  175 lines

  1. Short:     GoldED4 online code indention V37.6
  2. Uploader:  mshopf@informatik.uni-erlangen.de (Matthias Hopf)
  3. Author:    mshopf@informatik.uni-erlangen.de (Matthias Hopf)
  4. Type:      text/edit
  5. Version:   37.6 beta
  6.  
  7. COPYIGHT
  8.  
  9.   ©1997 Matthias Hopf. All rights reserved.
  10.  
  11.   Some routines are based partially on the public domain CLib package from
  12.   Andreas R. Kleinert. Thanx!
  13.  
  14.  
  15. DISTRIBUTION
  16.  
  17.   This package is distributed as FreeWare under the GNU license.
  18.  
  19.  
  20. DESCRIPTION
  21.  
  22.   This is an API client for GoldED 4 that will scan all entered text and
  23.   indent it according to its built-in rules. The scanner is quite versatile
  24.   and will also report several types of syntax errors.
  25.  
  26.   Scanning will be done automatically when you press keys that could have
  27.   implications on the indentation of the current line. There is a new
  28.   ARexx command 'SMARTINDENT', too, with which you can explicitely start
  29.   the intendation process.
  30.  
  31.   By default the installation script will map for the C-source filetype TAB
  32.   to 'SMARTINDENT LINE', alt-TAB to 'SMARTINDENT BLOCK', shift-TAB and
  33.   ctrl-TAB to 'TAB' and shift-ctrl-TAB to 'BACKTAB', so you don't lose the
  34.   tabulator availability.
  35.  
  36.   Please note that the installer script does not yet create a
  37.   'smartindenting' Lisp source filetype. You will have to create it by hand.
  38.   I suggest a filename pattern like "(#?.scm|#?.lisp|#?Install#?)".
  39.  
  40.   Source code is provided and almost cleaned up. I would love to add more
  41.   indentation semantic parsers for other languages :^) If you like to create
  42.   your own semantic parser, start with semantics_lisp.c - it is much simpler
  43.   than the c-source semantics parser... Information about the used macros
  44.   is provided in semantics.h, about the helper functions in util.h.
  45.  
  46.   ToDo: Still does some intentions not as I would like it to, but it's
  47.     getting better. Better documentation needed. Configuration GUI
  48.     (showing indentation of example source) needed.
  49.  
  50.  
  51. CURRENTLY KNOWN INDENTION MODES
  52.  
  53.     C        (C and C++ source)
  54.     Lisp     (Lisp and derivates, e.g. Installer scripts)
  55.  
  56.  
  57. INSTALLATION
  58.  
  59.   Doubleclick at the installer script icon. It assumes that you already
  60.   have the envCPP filetype package installed.
  61.  
  62.   For using Smartindent with Lisp source code you will at least have to
  63.   create a Lisp GoldED type by hand and add Smartindent to the api
  64.   configuration (arguments 'MODE Lisp'). Best configure TAB to invoke
  65.   'SMARTINDENT LINE' as well.
  66.  
  67.  
  68. SYNTAX:
  69.  
  70.   API startup arguments:
  71.  
  72.     Template: MODE/K,DEBUG/N/K,CONFIG/M/N/K
  73.  
  74.       MODE:   Indention mode. When this argument is not specified or the
  75.           given mode is unknown, a list of all known indention modes
  76.           is shown in a requester.
  77.  
  78.       DEBUG:  One nummeric argument that specifies the debug level
  79.           (see util.h for more information)
  80.  
  81.       CONFIG: Currently 7 (or less) integer values that specify
  82.           (in this order):
  83.  
  84.       - C-code Example:
  85.  
  86.       if (x)
  87.       ....x = x+1;         - Block indentation level   (default 4)
  88.       switch (x)
  89.       ..{                  - Brace indentation level   (default 0, here: 2)
  90.       x = x + 1;
  91. <-      case 1:            - Label indentation level   (default -2)
  92.       long int
  93.       ..value;         - Continued statement level (default 2)
  94.       value =
  95.          .0;       - Continued equation level  (default 1)
  96.  
  97.       ..../* xx */     - Standard comment level    (default 4)
  98.  
  99.       x=0;..../* x */  - (Absolute) in-line comment level (default 40)
  100.  
  101.  
  102.       - Lisp-code Example:
  103.  
  104.       (
  105.       ...function          - Block indentation level   (default: 1, here: 3)
  106.  
  107.                - Brace indentation level   (currently unused)
  108.                - Label indentation level   (currently unused)
  109.                - Continued statement level (currently unused)
  110.       (function
  111.            ...arg      - Continued equation level  (default 1, here: 3)
  112.  
  113.       ....; xx             - Standard comment level    (default 4)
  114.  
  115.       (xxx)....; x         - (Absolute) in-line comment level (default 40)
  116.  
  117.  
  118.  
  119.   'SMARTINDENT' command arguments:
  120.  
  121.     Template: LINE/S,LASTLINE/S,CURSOR/S,BLOCK/S
  122.  
  123.       LINE:      Indent current line
  124.       LASTLINE:  Indent the line one above the current line
  125.       CURSOR:    Move cursor to last indentation position in this line
  126.       BLOCK:     Indent marked block
  127.  
  128.  
  129. BUGS
  130.  
  131.   Yes, there are some bugs left, but only according to wrong indented
  132.   lines. So far smartindent V37.6 has not crashed my Amiga at all.
  133.   Read the comment at the beginning of test_input.c and test_correct.c for
  134.   more details.
  135.  
  136.  
  137. HISTORY
  138.  
  139.   V37.6 beta
  140.     - Some more indention bug fixes:
  141.       lines 164 166 178 181 198 of test_input.c are correct now.
  142.     - Added 'Lisp' indention mode (e.g. for Installer scripts)
  143.     - Corrected c semantics to more correctly interprete C++ code
  144.       (bug-report: Henning Tietgens, thanx!)
  145.     - Comments are no longer nested (bug-report: Marty King, thanx!)
  146.     - Configuration is now window-dependend and no longer global
  147.     - Some small other fixes
  148.  
  149.   V37.5 beta
  150.     - Some more indention bug fixes.
  151.     - Bug fix in endless loop detection.
  152.     - Indenting code less often on pressing '/' or '*' now
  153.       (only when necessary for comment indention).
  154.     - Finally implemented routine dispatcher needed for multiple
  155.       indention modes.
  156.  
  157.   V37.4 beta
  158.     - Some indention bug fixes. Should recognize all C++ words now.
  159.  
  160.   V37.3 beta
  161.     - Loads of bug fixes, one even potentially harmfull
  162.     - 'test' smakefile target and test_input.c testing source file for
  163.       checking indention abilities.
  164.  
  165.   V37.2 beta2
  166.     - Version information bug fixed. Installer should install the
  167.       API-client correctly now.
  168.     - Installer script reworked.
  169.     - New regedit for installation process provided. Thanx Dietmar!
  170.  
  171.   V37.2 beta
  172.     - First release.
  173.  
  174.  
  175.